layui.config({
    base: '/static/layui/'
}).extend({
    index: 'index'
}).use(['layer','form'], function () {
    var $ = layui.$, form = layui.form;
    saveForm(form, "formBtn", "/sys/role/save");
    var id = $("#id").val();
    if (id != '' && id != null) {
        getData('/sys/role/get/' + id, function (d) {
            form.val("baseForm", d.data);
        });
    }
});